⟸ Go Back ⟸
Exercise 3 (Homework 3).
(pumping lemma, hard exercise)

On as in the first part and bs in the second part

Given k\in \mathbb N, show that L_k=\{xy\in \{a,b\}^* \mid |x|_a=k|y|_b\} is regular if and only if k=1 or k=0.

The hard part is to show that for k>1, the language L_k is not regular. Think of k=2 first. The argument for a generic k is a simple generalization of this case.

Consider the reverse of L_2.